package com.itcast.wrap_class;

import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        // 包装类

        Integer a = 100;
        int b = a + 100;
        System.out.println(b);

        Double c = 1.34;
        byte b1 = c.byteValue();
        float fl = c.floatValue();
        System.out.println("b1 -> " + b1);
        System.out.println("fl -> " + fl);

        // 字符串转基本数据类型
        String d = "120";
        int e = Integer.parseInt(d);
        System.out.println(e);

        String f = "12.345";
        double g = Double.parseDouble(f);
        System.out.println(g);

        String h = "true";
        boolean k = Boolean.parseBoolean(h);
        System.out.println(k);

        String m = "Ke";
        char n = m.charAt(0);
        System.out.println(n);

        // 基本数据类型转字符串 + "" 加空字符串
        boolean u = false;
        String w = u + "";
        System.out.println(w);
        boolean yes = w instanceof String;
        System.out.println(yes);
    }
}
